<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>自动报名活动</title>
    <script src="sidebar.js"></script>
    <link rel="stylesheet" href="styles.css" type="text/css" />
  </head>

  <body>
    <div class="baoyi-registration-plugin">
      <div id="panelContainer" class="panel-container">
        <div class="panel">
          <div class="panel-title">
            账号登录
            <span id="version" style="font-size: 12px; color: #999; margin-left: 8px;"></span>
          </div>
          <form id="loginForm">
            <div class="form-group">
              <label for="username">账号</label>
              <input type="text" id="username" placeholder="请输入用户名" />
            </div>
            <div id="passwordForm" class="form-group">
              <label for="password">密码</label>
              <input type="password" id="password" placeholder="请输入密码" />
            </div>
            <div class="form-group shop-select-wrapper">
              <label for="shopSelect">店铺</label>
              <select id="shopSelect" placeholder="请选择店铺"></select>
            </div>
            <div id="loginBtnWrapper" class="form-group login-btn-wrapper">
              <button id="loginBtn" type="submit">登录</button>
            </div>
          </form>
        </div>

        <div class="panel active-panel">
          <div class="panel-title">自动报名设置</div>
          <div class="form-group">
            <label for="platformSelect">平台</label>
            <select id="platformSelect">
              <option value="shein">SHEIN</option>
            </select>
          </div>
          <div class="form-group">
            <label for="activeType">活动类型</label>
            <select id="activeType">
              <option value="shop">营销活动报名</option>
              <option id="semiPlatform" value="semiPlatform">
                营销工具-限时折扣-半托管
              </option>
              <option id="selfPlatform" value="selfPlatform">
                营销工具-限时限量购-自运营
              </option>
            </select>
          </div>
          <div class="form-group">
            <label for="pluginMode">插件运行模式</label>
            <select id="pluginMode">
              <option value="visualizationMode">根据已选商品报名模式</option>
              <option value="quickMode">快速模式</option>
            </select>
          </div>
          <div class="form-group" id="priceSourceWrapper" style="display: none;">
            <label for="priceSourceSelect">价格来源</label>
            <select id="priceSourceSelect">
              <option value="erpPrice">根据ERP货源价格</option>
              <option value="platformPrice">根据平台价格</option>
            </select>
          </div>
          <div class="form-group" id="multiplierWrapper">
            <label for="multiplierMinInput">最小倍率</label>
            <input
              type="number"
              id="multiplierMinInput"
              step="0.01"
              min="0.01"
              value="1"
            />
          </div>
          <div class="form-group" id="multiplierMaxWrapper">
            <label for="multiplierMaxInput">最大倍率</label>
            <input
              type="number"
              id="multiplierMaxInput"
              step="0.01"
              min="0.01"
              value="1"
            />
          </div>
          <div class="form-group" id="platformPricePercentageWrapper" style="display: none;">
            <label for="platformPricePercentageInput">降价百分比 (%)：如输入20则价格为 100 * (1 - 0.2) = 80</label>
            <input
              type="number"
              id="platformPricePercentageInput"
              step="0.01"
              min="0"
              max="100"
              value="0"
            />
          </div>
          <div class="form-group" style="display: none;">
            <label for="addGoodsNumberInput2">添加商品数量</label>
            <input
              type="number"
              id="addGoodsNumberInput2"
              step="50"
              min="1"
              max="500"
              value="500"
            />
          </div>
          <div class="form-group auto-add-goods-wrapper" style="display: none">
            <input type="checkbox" id="addGoodsCheckbox" />
            <label for="addGoodsCheckbox">报名时自动添加商品</label>
            <input
              type="number"
              id="addGoodsNumberInput"
              min="1"
              max="500"
              value="500"
            />
            <button id="onlyAddGoodsBtn">只添加商品</button>
          </div>
          <div class="form-group">
            <button id="startBtn">开始报名</button>
          </div>
        </div>
      </div>

      <div id="help" style="margin-top: 10px">
        <h3>使用说明</h3>
        <p>
          1. 执行该操作时请确保当前正处于对应活动类型的活动页面
          <a
            id="activeSimpleImage"
            href="./icons/active-simple_shop.png"
            target="_blank"
            alt="示例图片"
          >
            示例图片
          </a>
        </p>
        <p>
          2.
          我们将根据商品采购价格✖(最小倍率~最大倍率),从中找到符合降幅条件的价格填入
        </p>
        <p>
          3.
          如果找不到商品采购价格或者商品采购价格✖倍率范围不在降幅条件中将移除商品
        </p>
        <p>4. 请选择正确店铺,若当前店铺找不到商品采购价将移除</p>
      </div>
    </div>
  </body>
</html>
